Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x: Fix ExecutorScheduler initializing Schedulers prematurely #7323

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

akarnokd
Copy link
Member

ExecutorScheduler had a static field referencing Schedulers thus when using RxJavaPlugins.createExecutorScheduler, it would still initialize the standard schedulers despite the intention of the create method. Using the static inner holder class idiom can prevent this, similar to how Schedulers does it.

Related: #7306 (comment)

@akarnokd akarnokd added this to the 3.1-support milestone Aug 25, 2021
@codecov
Copy link

codecov bot commented Aug 25, 2021

Codecov Report

Merging #7323 (fdf8010) into 3.x (804b8ef) will increase coverage by 0.01%.
The diff coverage is 75.00%.

❗ Current head fdf8010 differs from pull request most recent head 5b664b3. Consider uploading reports for the commit 5b664b3 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #7323      +/-   ##
============================================
+ Coverage     99.53%   99.54%   +0.01%     
+ Complexity     6784     6783       -1     
============================================
  Files           751      751              
  Lines         47490    47491       +1     
  Branches       6378     6378              
============================================
+ Hits          47269    47277       +8     
+ Misses          102       96       -6     
+ Partials        119      118       -1     
Impacted Files Coverage Δ
...rxjava3/internal/schedulers/ExecutorScheduler.java 99.56% <75.00%> (-0.44%) ⬇️
.../operators/flowable/FlowableBlockingSubscribe.java 93.02% <0.00%> (-4.66%) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 94.44% <0.00%> (-3.97%) ⬇️
...nternal/operators/parallel/ParallelReduceFull.java 93.06% <0.00%> (-1.99%) ⬇️
...ternal/operators/completable/CompletableMerge.java 97.29% <0.00%> (-1.36%) ⬇️
.../operators/observable/ObservableCombineLatest.java 99.38% <0.00%> (-0.62%) ⬇️
.../reactivex/rxjava3/observers/BaseTestConsumer.java 99.46% <0.00%> (-0.54%) ⬇️
...a3/internal/operators/flowable/FlowableCreate.java 99.02% <0.00%> (-0.33%) ⬇️
...3/internal/operators/flowable/FlowableGroupBy.java 84.73% <0.00%> (-0.30%) ⬇️
...ernal/operators/flowable/FlowableFlatMapMaybe.java 97.40% <0.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 804b8ef...5b664b3. Read the comment docs.

@akarnokd akarnokd merged commit f3d8583 into ReactiveX:3.x Aug 25, 2021
@akarnokd akarnokd deleted the ExecutorSchedulerInitFix branch August 25, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants